package pl.edu.agh.uddiProxy.client;

import java.util.List;
import java.util.Map;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;

public interface SearchService extends RemoteService {
	String SERVICE_URI = "/searchService.rpc";
	
	String T_MODEL_KEY = "tModelKey";
	String OWNER_KEY = "owner";
	String DISTANCE_KEY = "distance";
	
	public static final class Util {
		private Util() {
		}
		
		public static SearchServiceAsync getInstance() {
			SearchServiceAsync instance = (SearchServiceAsync) GWT.create(SearchService.class);
			ServiceDefTarget target = (ServiceDefTarget) instance;
			target.setServiceEntryPoint(GWT.getModuleBaseURL() + SERVICE_URI);
			return instance;
		}
	}
	
	Map<String, Parameter> getParametersMap();
	List<Map<String, String>> search(String query, Map<String, String> map, int limit);
	Map<String, String> getParameters(String tModelKey);
	void saveParameters(String tModelKey, Map<String, String> map);
	String getTModelInfo(String tModelKey);
	void downloadWSDL(String tModelKey);
}
